package com.ruoyi.yanjing.constant;


public class MessageConstant {
	
	public static enum MESSAGE_TYPE {
		PAYMENT("账户消费"), 
		REFUNDMENT("账户退款"),
		DRAW("账户提现"), 
		RECHARGE("账户充值"), 
		ORDER_PAYMENT("订单支付"), 
		ORDER_SHIPPED("订单发货"),
		ORDER_ACCEPT("订单确认"),
		ORDER_DELETE("订单删除"),
		ORDER_REFUNDING("订单退款发起"),
		ORDER_REFUND("订单退款完成");
		private String cnName;

		MESSAGE_TYPE(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (MESSAGE_TYPE item : MESSAGE_TYPE.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return this.name();
		}
	}
}
